The simulator is invoked by the command
The command interpreter reads in a query typed in by the user, evaluates it and prints the answer(s), repeating this until it encounters an end-of-file (the standard end-of-file character on the system, e.g. ctrl-D), or the user types end_of_file or halt.
The user should ensure that the the directory containing the executable file sim (typically, the system directory sim) is included in the shell variable path; if not, the full path to the simulator will have to be specified.
In general, the simulator may be invoked with a variety of options, as follows:
sbprolog -option1 -option2 … -optionn bc_file
The options recognized by the simulator are described below.
When called with a byte code file bc_file, the simulator begins execution with the first clause in that file. The first clause in such a file, therefore, should be a clause without any arguments in the head (otherwise, the simulator will attempt to dereference argument pointers in the head that are really pointing into deep space, and usually come to a sad end). If the user is executing a file in this manner rather than using the command interpreter, he should also be careful to include the undefined predicate handler `_$undefined_pred'/1, which is normally defined in the file modlib/$init_sys.P.